Fragment Distribution: Simple Fragment Length Distribution
Description
Density, distribution function, quantile function and random
generation for a simple parametric distribution for fragments lengths
(given by conditioning a geometric distribution on whether the length
can be recovered).
vector of locations of logistic for prob of recovery.
lscale
vector of scales of logistic for prob of recovery.
rate
probability for geometric probability for fragment lengths.
maxx
integer; largest value of x to bother with.
lower.tail
logical; if TRUE (default), probabilities are
\(P[X \le x]\) otherwise, \(P[X > x]\).
Value
dfrag gives the mass function,
pfrag gives the distribution function,
qfrag gives the quantile function, and
rfrag generates random deviates.
Details
The mass function is given by
plogis(x,loc,lscale)*dgeom(x,rate) / denom , where denom
scales the result to sum to 1.0 in the range 0:maxx. The other
functions all depend on this in the obvious manner. If maxx is
not large enough a warning may be issued, but even without this warning
the results may be slightly innaccurate if
pgeom(maxx,rate,lower.tail=FALSE) is non-negligible.